package com.cloud.code.牛客网;

import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;

public class Test26 {


    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        while (scanner.hasNext()) {
            int start = scanner.nextInt();
            int end = scanner.nextInt();
            Map<Integer,String>  map = new HashMap<>();
            for (int i = start; i < end; i++) {
                for (int j = start; j < end; j++) {
                    for (int k = start; k < end; k++) {
                        if (i == j || j == k || i == k) {
                            continue;
                        }

                        if (i * i + j * j == k * k) {
                            if (isgong(i, j) && isgong(j, k) && isgong(j, k)) {
                                int[] tem = new int[3];
                                tem[0] = i;
                                tem[1] = j;
                                tem[2] = k;

                                Arrays.sort(tem);
                                StringBuffer temp = new StringBuffer();

                                for (int l = 0; l < tem.length; l++) {
                                    temp.append(" ").append(tem[l]);
                                }
                                if(map.get(temp.toString()) == null){
                                    System.out.println(temp);
                                    map.put(Integer.parseInt(temp.toString().replace(" ","")),temp.toString());
                                }
                            }
                        }
                    }
                }
            }

            if(map.size() == 0){
                System.out.println("NA");
            }

        }
    }

    private static boolean isgong(int x, int y) {
        int min = Math.min(x,y);
        double dr = Math.sqrt(min);
        for (int i = 2; i < dr; i++) {
            if (x % i == 0 && y % i == 0) {
                return false;
            }
        }
        return true;
    }


}
